package org.msz.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.msz.common.BaseEntity;

import javax.persistence.*;

@Entity
@Table(name = "sys_role_menu")
public class SysRoleMenu extends BaseEntity
{
    /** 角色ID */
    @Basic(optional = false)
    @Column(name = "role_id")
    @Id
    private String roleId;

    /** 菜单ID */
    @Basic(optional = false)
    @Column(name = "menu_id")
    @Id
    private Long menuId;

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public Long getMenuId()
    {
        return menuId;
    }

    public void setMenuId(Long menuId)
    {
        this.menuId = menuId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("roleId", getRoleId())
                .append("menuId", getMenuId())
                .toString();
    }
}